home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / C⁄C++ 68k folder / C⁄C++ 68k 1.1.1.2 Notes next >
Encoding:
Text File  |  1994-09-28  |  6.6 KB  |  307 lines  |  [TEXT/MMCC]

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
  2. 68K C/C++ 
  3. Compiler release notes:
  4. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
  5.  
  6. Metrowerks 68K C/C++ Compiler release notes 
  7. =========================================== 
  8.  
  9. Version: CW4+
  10. Date: September 1, 1994
  11. Author: Andreas Hommel
  12.  
  13. New features/fixes since DR/4:
  14.  
  15. - Support for C++ templates (see notes in "MWC++ limitations") 
  16.  
  17. - C++, 68k codegen and preprocessor fixes 
  18.  
  19. - Improved floating point code generation 
  20.  
  21. - Improved C++ default function handling 
  22.  
  23. - New #pragmas:
  24.  
  25. "#pragma ANSI_strict (on|off")" on: enforce ANSI; off: relaxed ANSI 
  26. standard on (ANSI C only ):
  27. - disallow new style '//' comments
  28. - disallow non-'int' bitfields
  29. - disallow unnamed arguments in function definitions "void f(int ) {}" 
  30.  
  31. on (ANSI C or C++):
  32. - disallow empty array struct members
  33. - disallow '#' tokens in a macro definitions that are not followed by a 
  34. parameter
  35. - disallow identifier token after #endif 
  36.  
  37. "#pragma warning_errors (on|off")" on: treat all warnings as errors 
  38.  
  39.  
  40. Bug Reports
  41. ```````````
  42.  
  43. Please send in your bug reports using the Applelink/Internet BugReport 
  44. stored in the release notes folder. Send reports to: 
  45.  
  46. ------------------------------------------------------------------------- 
  47. Andreas Hommel
  48. CodeWarrior C/C++ 68K Product Architect
  49. Metrowerks, Inc.
  50.  
  51. Applelink: SUPPORTWERKS
  52. Internet: support@metrowerks.com
  53.  
  54. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  55. MWC++ limitations:
  56. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
  57.  
  58. o Precompiled headers
  59.  
  60. MWC++ can now dump C++ specific data (including classes, inlines, etc.) 
  61. into precompiled header files. However there are some restrictions: 
  62.  
  63. - Access declarations cannot be exported. 
  64.  
  65. - No declarations that actually define data (except const 
  66. int/enum/float/pointer decls)
  67. or functions (except non-virtual inline functions) can be exported. 
  68.  
  69. - Including C++ generated headers in ANSI C sources is undefined and 
  70. should 
  71. be avoided (especially if there are inline functions in the precompiled 
  72. header).
  73.  
  74. ------------
  75.  
  76. o ARM 5.3.1: Increment Decrement
  77.  
  78. Prefix ++ and -- expressions are no lvalues. 
  79.  
  80.  
  81. ------------
  82.  
  83. o ARM 5.3.3: New
  84.  
  85. MWC++ does not yet support the post ARM new[] extension 
  86.  
  87. void* operator new[](size_t); // <<< not yet accepted 
  88.  
  89. ------------
  90.  
  91. o ARM 5.3.4: Delete
  92.  
  93. MWC++ does not yet support the post ARM delete[] extension 
  94.  
  95. void operator delete[](void *);// <<< not yet accepted 
  96.  
  97. ------------
  98.  
  99. o ARM 5.16:Conditional Operator
  100.  
  101. Reference conversions are not applied to the 2nd and 3rd expression of the 
  102. conditional operator.
  103.  
  104. class base { };
  105. class derived : public base { };
  106.  
  107. static void foo(deri i)
  108. {
  109. base& a=i;
  110. derived&b=i;
  111.  
  112. sizeof( 0 ? a : b );// <<< illegal: a not converted to (Base&)b }
  113.  
  114. ------------
  115.  
  116. o ARM 5.17:Assignment Operators
  117.  
  118. The result of an assignment is not an lvalue. 
  119.  
  120. int a;
  121.  
  122. (a=1)++; // illegal: (a=1) is no lvalue
  123.  
  124. ------------
  125.  
  126. o ARM 7.1.2: Function Specifiers
  127.  
  128. virtual must be the first token in a declartion. 
  129.  
  130. class foo {
  131. virtual int f();// ok
  132. int virtual f();// <<< not accepted
  133. };
  134.  
  135. ------------
  136.  
  137. o ARM 8.2.6: Default Arguments
  138.  
  139. default parameters in member functions are not bound at the end of a class 
  140. declaration.
  141.  
  142. class foo {
  143. enum A { AA };
  144. int f(A a = AA);// ok
  145. int f(B b = BB);// <<< not accepted (BB is not yet declared) enum B { BB };
  146. };
  147.  
  148. ------------
  149.  
  150. o ARM 9.7: Nested scopes
  151.  
  152. A friend function defined within a class is not in the scope of that 
  153. class. 
  154.  
  155. struct foo
  156. {
  157. static int i;
  158. friend int foofunc()
  159. {
  160. return i; // <<< i not in scope
  161. }
  162. };
  163.  
  164. ------------
  165.  
  166. o ARM 9.8: Local Class Declarations with inline functions 
  167.  
  168. MWC++ cannot access local types or variables from within a function-nested 
  169. class inline function declaration (all inline functions are inserted on 
  170. global scope level):
  171.  
  172. void foo()
  173. {
  174. static int s;
  175. enum E { AA; };
  176.  
  177. class local {
  178. int f1() { return s; } // <<< cannot access 's' int f2() { return 
  179. local::f1(); }// <<< cannot access 'local' int f3() { return int(AA); }// 
  180. <<< cannot access 'AA' };
  181. }
  182.  
  183. ------------
  184.  
  185. o ARM 11.4:Friends
  186.  
  187. friend must be the first token in a declaration. 
  188.  
  189. class foo {
  190. friend int f1();// ok
  191. int friend f2();// <<< not accepted
  192. };
  193.  
  194. ------------
  195.  
  196. o ARM 12.1:Constructors
  197.  
  198. MWC++ does not generate a copy constructor for "simple classes". 
  199.  
  200. A "simple class" is a class that:
  201. - is only derived from simple classes or not derived - does not have any 
  202. non-simple class members - does not have any virtual member functions - 
  203. does not have any virtual base classes - does not have any 
  204. constructor/destructor 
  205.  
  206. class foo { int f; };
  207.  
  208. void foof(foo fa)
  209. {
  210. foo lf1=foo(fa);// <<< error explicit copy constructor call; no default 
  211. cop constructor generated
  212. foo lf1=fb; // ok: (bitwise copy)
  213. }
  214.  
  215. ------------
  216.  
  217. o ARM 12.4:Destructors
  218.  
  219. MWC++ cannot explicitly destroy non-class types 
  220.  
  221. typedef long T; T *p; p->T::~T(); // <<< cannot destroy 
  222.  
  223. ------------
  224.  
  225. o ARM 12.8:Copying class objects
  226.  
  227. MWC++ does not generate a default operator= for "simple classes" (see 12.1 
  228. above).
  229.  
  230. MWC++ does not enforce the rule that objects representing virtual base 
  231. classes will
  232. be assign only once by a generated assigment operator. 
  233.  
  234. MWC++ does enforce the rule that objects representing virtual base classes 
  235. will be initalized only once by a generated copy constructor. 
  236.  
  237. ------------
  238.  
  239. o ARM 14: Templates
  240.  
  241. Instantiation:
  242.  
  243. The current implementation of MWC++ templates requires that the definition 
  244. of a function template has been parsed before the end of the translation 
  245. unit if a function needs to be instantiated from that template. 
  246.  
  247. Features that are not yet supported (or do not yet work under all 
  248. circumstances):
  249.  
  250. - template friend classes
  251.  
  252. template<class T> class X { ...
  253. template<class T> class Y {
  254. friend class X<T>; // <<< not accepted
  255.  
  256.  
  257. - forward pointer references to undefined class templates 
  258.  
  259. template<class T> class X;
  260. X<int> *ip; // <<< not accepted
  261.  
  262.  
  263. - template access declarations
  264.  
  265. template<class T> class X { int i; ...
  266. template<class T> class Y : X<T> {
  267. X<T>::i;// <<< not accepted
  268.  
  269. - class template specializations
  270.  
  271. template<class T> class X { ...
  272. class X<char> { ... // <<< not accepted
  273.  
  274. - non-type template parameters in member function templates 
  275.  
  276. template<int I> class X { void f(); };
  277. template<int I> void X<I>::f() { ... } // <<< not accepted 
  278.  
  279. - friend function templates
  280.  
  281. template<class T> class X {
  282. friend void f();
  283. };
  284. template<class T> void f() { ... } // <<< not used to generate friend 
  285.  
  286. - static class member templates (not accepted) 
  287.  
  288. template<class T> class X {
  289. static T st;
  290. };
  291. template<class T> T X<T>::st = 1; // <<< not accepted 
  292.  
  293. ------------
  294.  
  295. o ARM 15: Exception Handling
  296.  
  297. not yet supported
  298.  
  299. ------------
  300.  
  301. o ARM ??: RTTI
  302.  
  303. not yet supported
  304.  
  305. ------------
  306.  
  307. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%